package com.school.appleforgetbackend.controller;

import com.school.appleforgetbackend.BO.request.HomeRequest;
import com.school.appleforgetbackend.BO.request.SwxxRequest;
import com.school.appleforgetbackend.BO.response.*;
import com.school.appleforgetbackend.service.UnderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 试验场
 * **/
@Controller
@RequestMapping("/api/aqr/statistic")
public class UnderController {

    @Autowired
    private UnderService underService;

    /**
     * 首页-水位信息
     **/
    @RequestMapping(value = "/home/swxx")
    @ResponseBody
    public SwxxResponse getHomeswxx(@RequestBody SwxxRequest swxxRequest) {
        SwxxResponse swxxResponse = underService.getHomeswxx(swxxRequest);
        System.out.println(swxxResponse);
        return swxxResponse;
    }

    /**
     * 首页-左侧
     **/
    @RequestMapping(value = "/home/ljsc")
    @ResponseBody
    public CumulativeResponse getHomeljsc(@RequestBody SwxxRequest swxxRequest) {
        CumulativeResponse cumulativeResponse = underService.getHomeljsc(swxxRequest);
        System.out.println(cumulativeResponse);
        return cumulativeResponse;
    }

    /**
     * 首页-井群统计
     **/
    @RequestMapping(value = "/home/jqtj")
    @ResponseBody
    public CountAndEchoResponse getHomejqtj(@RequestBody SwxxRequest swxxRequest) {

        CountAndEchoResponse countAndEchoResponse = underService.getHomejqtj(swxxRequest);
        System.out.println(countAndEchoResponse);
        return countAndEchoResponse;
    }

    /**
     * 首页-井群分布
     **/
    @RequestMapping(value = "/home/jqfb")
    @ResponseBody
    public WellResponse getHomejqfb(@RequestBody HomeRequest homeRequest) {
        WellResponse wellResponse = underService.getHomejqfb(homeRequest);
        System.out.println(wellResponse);
        return wellResponse;
    }
/**孔隙水压力井列表、分层表列表 两个接口看不出用不用的到，所以没接**/






    /**
    * 试验场-水位信息
    **/
    @RequestMapping(value = "/syc/swxx")
    @ResponseBody
    public SwxxResponse getswxx(@RequestBody SwxxRequest swxxRequest) {
        SwxxResponse swxxResponse = underService.getswxx(swxxRequest);
        System.out.println(swxxResponse);
        return swxxResponse;
    }


    /**
     * 试验场-设施情况-数量和回补井状态
     * **/
    @RequestMapping(value = "/syc/ssqk")
    @ResponseBody
    public EquipmentResponse getssqk(@RequestBody SwxxRequest swxxRequest) {
        EquipmentResponse equipmentResponse = underService.getssqk(swxxRequest);
        System.out.println(equipmentResponse);
        return equipmentResponse;
    }

    /**
     * 试验场-水质监测数据信息
     * **/
    @RequestMapping(value = "/syc/qualityData")
    @ResponseBody
    public WaterQualityResponse getQuality(@RequestBody SwxxRequest swxxRequest) {
        WaterQualityResponse waterQualityResponse = underService.getQuality(swxxRequest);
        System.out.println(waterQualityResponse);
        return waterQualityResponse;
    }

    /**
     * 试验场-水质监测数据信息
     * **/
    @RequestMapping(value = "/syc/flowData")
    @ResponseBody
    public TrafficResponse getFlowData(@RequestBody SwxxRequest swxxRequest) {
        TrafficResponse trafficResponse = underService.getFlowData(swxxRequest);
        System.out.println(trafficResponse);
        return trafficResponse;
    }
    /**
     * 水位监测数据信息、获取流量列表数据，一小时或一天内一条返回结果为空，没接
     ***/


    /**
     * 回补井群-实时监测  回补井基本信息-实时监测
      **/
    @RequestMapping(value = "/hbjq/hbj")
    @ResponseBody
    public ReWellResponse gethbj(@RequestBody SwxxRequest swxxRequest) {
        ReWellResponse reWellResponse = underService.gethbj(swxxRequest);
        System.out.println(reWellResponse);
        return reWellResponse;
    }

    /**
     * 回补井-设备情况列表
     **/
    @RequestMapping(value = "/hbjq/sbqk")
    @ResponseBody
    public SbEquipmentResponse getsbqk(@RequestBody SwxxRequest swxxRequest) {
        SbEquipmentResponse sbEquipmentResponse = underService.getsbqk(swxxRequest);
        System.out.println(sbEquipmentResponse);
        return sbEquipmentResponse;
    }

    /**
     * 回补井-补水分析列表
     **/
    @RequestMapping(value = "/hbjq/bsfx")
    @ResponseBody
    public AnalyzeResponse getbsfx(@RequestBody SwxxRequest swxxRequest) {
        AnalyzeResponse analyzeResponse = underService.getbsfx(swxxRequest);
        System.out.println(analyzeResponse);
        return analyzeResponse;
    }

    /**
     * 监测井群-分层标列表
     **/
    @RequestMapping(value = "/jcjq/fcb")
    @ResponseBody
    public LayeringResponse getjcjqfcb(@RequestBody SwxxRequest swxxRequest) {
        LayeringResponse layeringResponse = underService.getjcjqfcb(swxxRequest);
        System.out.println(layeringResponse);
        return layeringResponse;
    }

    /**
     * 监测井群-监测井设备列表
     **/
    @RequestMapping(value = "/jcjq/sbqk")
    @ResponseBody
    public JcEquipmentResponse getjcjqsbqk(@RequestBody SwxxRequest swxxRequest) {
        JcEquipmentResponse jcEquipmentResponse = underService.getjcjqsbqk(swxxRequest);
        System.out.println(jcEquipmentResponse);
        return jcEquipmentResponse;
    }

    /**
     * 监测井群-监测井列表
     **/
    @RequestMapping(value = "/jcjq/list")
    @ResponseBody
    public JcWellEntityResponse getjcjqlist(@RequestBody SwxxRequest swxxRequest) {
        JcWellEntityResponse jcWellEntityResponse = underService.getjcjqlist(swxxRequest);
        System.out.println(jcWellEntityResponse);
        return jcWellEntityResponse;
    }
}


